package jee.boot.module.iexp.excel.excel;

import jee.boot.common.utils.JsonMapper;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;

import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Map;

public class TestImport {
    public static void main(String[] args) {

        try {
            ExcelImport ei=new ExcelImport(new File("C:\\Users\\zhilei z wang\\Desktop\\20200211_PwC_月报填报模板_V6.xlsx"),2,"表1-1(资)");
            ei.configArea("A","Z",0,81);
            List<Map>list=ei.getDataList(Map.class);
            System.out.println(JsonMapper.toJsonString(list));

        } catch (InvalidFormatException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (InstantiationException e) {
            e.printStackTrace();
        }
    }
}
